package com.aaa.controller.tables;

import com.aaa.dao.FCartMapper;
import com.aaa.service.FCartService;
import com.wsc.entity.FCart;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("fcart")
public class FCartController {
    @Resource
    FCartService fCartService;
    @Resource
    FCartMapper fCartMapper;
    @RequestMapping("select")
    @ResponseBody
    public Object select(){
        return fCartService.select();
    }

    @RequestMapping("insert")
    @ResponseBody
    public Integer insert(FCart fCart){
        return fCartService.insert(fCart);
    }
    @RequestMapping("delete")
    @ResponseBody
    public Integer delete(Integer id){
        return fCartService.delete(id);
    }
    @RequestMapping("update")
    @ResponseBody
    public Integer update(FCart fCart){
        return fCartMapper.updateById(fCart);
    }
}
